<?php

class hdms_tagModel extends FoundryModel
{

	protected $afterDelete = 'postDelete';
	
	protected $isMapper		= true;
	
	protected $hasManyBelongsToMany = array(
		'net_mode3_news_news'
	);
	
	/**
	 * init()
	 *
	 * init() is called in place of the __construct() method used by the
	 * FoundryModel super class
	 * This function will be called immediately after the __construct method
	 *
	 */ 
	public function init()
	{
	
	
	}

	public function postDelete()
	{
		if( $this->uid ) {
			$sql = 'delete from '.$this->table.'Map where tag_id = '.
				$this->uid;

			$this->dbh->exec( $sql );
		}
	}

}

?>